<?php
/**
 * User: Hunman
 * Date: 17.07.13
 * Time: 21:35
 */
class Controller_Product extends Controller_Default
{

    function __construct($productId)
    {
        $productId = (int) $productId;
       // parent::__construct();
        $this->getProduct($productId);
    }

    private
    function getProduct($id)
    {
        $id = (int)$id;

        $model = new Model_Product;
        $productInfo = $model->getProductData($id);

        $view = new View_Product();
        $view->pageContent = $productInfo;

        $this->view = $view->view();
        $this->pagination(get_class(), $id);
        $this->render("product.twig");


    }
}